package xuanke;

public class StudentCourseSystemTest {
    public static void main(String[] args) {
        // 创建教师对象
        Teacher teacher1 = new Teacher("T001", "张世博", "男");
        Teacher teacher2 = new Teacher("T002", "崔宁", "女");
        
        // 创建课程对象
        Course course1 = new Course("C001", "Java程序设计", "A101", "周一上午");
        Course course2 = new Course("C002", "数据库原理", "B202", "周三下午");
        
        // 为教师分配课程
        teacher1.setCourse(course1);
        teacher2.setCourse(course2);
        
        // 为课程分配教师
        course1.setTeacher(teacher1);
        course2.setTeacher(teacher2);
        
        // 创建学生对象
        Student student1 = new Student("S001", "思恒", "男");
        Student student2 = new Student("S002", "清然", "女");
        
        // 学生选课
        student1.selectCourse(course1);
        student2.selectCourse(course2);
        
        // 教师授课
        teacher1.teach();
        teacher2.teach();
        
        // 查询学生课表
        System.out.println("==========学生课表==========");
        student1.queryCourseInfo();
        System.out.println("--------------------------");
        student2.queryCourseInfo();
        
        // 学生退课
        student1.dropCourse();
        student1.queryCourseInfo();
    }
}